<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
	<spring:message var="pageTitle" code="agendaAjout.pageTitle" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<spring:url value="/resources/ckeditor/ckeditor.js" var="ckeditor_url" />
<spring:url value="/resources/ckeditor/adapters/jquery.js"
	var="ckeditor_jquery_url" />
<script type="text/javascript" src="${ckeditor_url}">
	<jsp:text/>
</script>
<script type="text/javascript" src="${ckeditor_jquery_url}">
	<jsp:text/>
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>${pageTitle}</title>
<link rel="stylesheet"
	href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"><link/>
<link href="<%=request.getContextPath()%>/resources/css/forms.css"
	rel="stylesheet"><link/>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link href="<%=request.getContextPath()%>/resources/css/forms.css"
	rel="stylesheet">
<script
	src="<%=request.getContextPath()%>/resources/js/datepicker-fr.js"></script>
<script>
	$(function() {
		$(".datepicker").datepicker();
		$(".datepicker").datepicker("dd/mm/yy", "dateFormat", $(this).val());
	});
</script>
</head>
<body>
	<div id="registration">
		<h2>Ajouter un événement</h2>
		<form:form id="formAgenda" method="post" action="post" modelAttribute="agenda">
		<form:errors path="*">
			<div><spring:message code="error.global"/></div>
		</form:errors>
		<fieldset>
		
		<div class="formseparator">
			<label><spring:message code="agendaAjout.label.titre"/></label>
			<form:input path="titre" cssClass="short" cssErrorClass="short error"/>
			<form:errors path="titre" htmlEscape="false" />
		</div>

		<div class="formseparator">
			<label><spring:message code="agendaAjout.label.description"/></label>
			<form:textarea path="description" cssClass="short" cssErrorClass="short error"/>
			<form:errors path="description" htmlEscape="false" />
		</div>			

		<div class="formseparator">
			<label><spring:message code="agendaAjout.label.dateExpiration"/></label>
			<form:input path="dateExpiration" cssClass="short datepicker" cssErrorClass="short error"/>
			<form:errors path="dateExpiration" htmlEscape="false" />
		</div>	
					 
		<div class="formseparator">
			<input type="submit" value="enregistrer" class="btn btn-lg btn-primary "/>
		</div>		
		</fieldset>
			<script>
				CKEDITOR.replace('description');
			</script>
		</form:form>
	</div>
</body>
</html>